package cn.seecoder.courselearning.po.post;

import cn.seecoder.courselearning.vo.post.PostVO;
import lombok.NonNull;

public class Post {
    private Integer postId;

    private Integer courseId;

    private Integer authorId;

    private String postName;

    private String content;

    private String authorName;

    public Integer getAuthorId() { return authorId; }

    public Integer getCourseId() { return courseId; }

    public Integer getPostId() { return postId; }

    public String getAuthorName() { return authorName; }

    public String getContent() { return content; }

    public String getPostName() { return postName; }

    public void setAuthorId(Integer authorId) { this.authorId = authorId; }

    public void setAuthorName(String authorName) { this.authorName = authorName; }

    public void setContent(String content) { this.content = content; }

    public void setPostId(Integer postId) { this.postId = postId; }

    public void setCourseId(Integer courseId) { this.courseId = courseId; }

    public void setPostName(String postName) { this.postName = postName; }

    public Post() {
    }

    public Post(@NonNull PostVO postVO){
        this.authorId=postVO.getAuthorId();
        this.authorName=postVO.getAuthorName();
        this.postId=postVO.getPostId();
        this.postName=postVO.getPostName();
        this.content=postVO.getContent();
        this.courseId=postVO.getCourseId();
    }
}
